/* pages/goods/category.wxss */
view {
    box-sizing: border-box;
}

page {
    padding-bottom: 100rpx;
    box-sizing: border-box;
    background-color: #f9800f !important;
}

.container {
    width: 100vw;
    height: calc(100vh - 100rpx);
    background-color: #f9800f;
    padding: 20rpx 0;
    box-sizing: border-box;
    justify-content: flex-start;
}

// 修改前的代码
.gift_discovery_box {
    width: 100%;
    padding: 0 30rpx;
    margin-bottom: 50rpx;
    transition: height 0.3s ease-out;

    .title {
        font-family: SourceHanSansCN, SourceHanSansCN;
        font-weight: bold;
        font-size: 70rpx;
        color: #ffffff;
    }

    // 新的实现 - 既有内凹效果，又保证凹角都有一致的圆角
    .filter_box {
        width: 100%;
        min-height: 300rpx;
        background: #fcfaee;
        border-radius: 20rpx;
        /* 设置所有角的基础圆角值 */
        position: relative;
        box-shadow: inset 0rpx 10rpx 20rpx 0rpx rgba(245, 145, 72, 0.3);
        margin-top: 30rpx;
        padding-bottom: 50rpx;

        // 使用伪元素创建右上角的内凹圆角效果
        &::before {
            content: "";
            position: absolute;
            top: 0;
            left: 166rpx;
            // 使用与主元素相同的圆角值来创建内凹效果
            width: 340rpx;
            /* 宽度略大于圆角值，确保内凹效果完整 */
            height: 200rpx;
            /* 高度略大于圆角值，确保内凹效果完整 */
            /* 设置与主元素相同的圆角值，创建内凹效果 */
            border-bottom-left-radius: 20rpx;
            /* 使用与主元素相同的圆角值 */
            /* 使用父容器的背景色创建内凹效果 */
            background-color: #f9800f;
            /* 调整位置使其完美融合 */
            transform: translate(50%, -50%) skewX(15deg);
            z-index: 1;
        }

        &::after {
            width: 100rpx;
            height: 100rpx;
            content: "";
            background-color: #f9800f;
            position: absolute;
            top: 0rpx;
            right: -10rpx;
            z-index: 9;
        }

        .top_icon {
            width: 342rpx;
            height: 294rpx;
            position: absolute;
            top: -162rpx;
            right: 0;
            z-index: 10;

            image {
                width: 342rpx;
                height: 294rpx;
            }
        }

        .top_title {
            height: 113rpx;
            position: relative;

            image {
                width: 143rpx;
                height: 113rpx;
                position: absolute;
                top: -2px;
                left: -2px;
            }

            .text {
                position: absolute;
                top: 50%;
                transform: translateY(-50%);
                left: 70rpx;
                font-family:
                    PingFangSC,
                    PingFang SC;
                font-weight: 600;
                font-size: 36rpx;
                color: #333333;
            }
        }

        .filter_content {
            width: 100%;
            padding: 0 30rpx;

            .filter_list {
                width: 100%;
                padding: 30rpx 0;

                &.line {
                    border-bottom: 1rpx solid #eceade;
                }

                .filter_item {
                    display: flex;
                    align-items: center;

                    &:not(:last-of-type) {
                        margin-bottom: 40rpx;
                    }

                    .name {
                        width: 100rpx;
                        font-family:
                            PingFangSC,
                            PingFang SC;
                        font-weight: 500;
                        font-size: 28rpx;
                        color: #333333;
                    }

                    ._scroll_view {
                        width: calc(100% - 120rpx);

                        .t_list {
                            white-space: nowrap;

                            .item {
                                display: inline-block;
                                padding: 0 20rpx;
                                // height: 44rpx;
                                line-height: 42rpx;
                                background: rgba(237, 234, 219, 0.8);
                                border: 1rpx solid rgba(237, 234, 219, 0.8);
                                border-radius: 26rpx;
                                font-weight: 400;
                                font-size: 24rpx;
                                color: #666;
                                margin-right: 20rpx;

                                &.active {
                                    background: #FBF3CB;
                                    border: 1rpx solid #F9800F;
                                }
                            }
                        }
                    }

                    ._scroll_view2 {
                        .t_list {
                            width: 100%;
                            white-space: normal;
                            flex-wrap: wrap;

                            .item {
                                margin-bottom: 20rpx;

                                text {
                                    vertical-align: middle;

                                }

                                image {
                                    width: 24rpx;
                                    height: 24rpx;
                                    margin-right: 6rpx;
                                    vertical-align: middle;
                                }
                            }
                        }
                    }

                    // 双滑块样式
                    .slider_box {
                        width: calc(100% - 120rpx);
                        padding: 20rpx 0;
                    }

                    .double_slider {
                        position: relative;
                        width: 100%;
                        height: 80rpx;
                    }

                    .slider_track {
                        position: absolute;
                        top: 40rpx;
                        left: 0;
                        width: 100%;
                        height: 4rpx;
                    }

                    .slider_track_background {
                        position: absolute;
                        top: 0;
                        left: 0;
                        width: 100%;
                        height: 100%;
                        background-color: #bbb;
                    }

                    .slider_track_active {
                        position: absolute;
                        top: 0;
                        height: 100%;
                        background-color: #f9800f;
                        z-index: 1;
                    }

                    .slider_points {
                        position: absolute;
                        top: 32rpx;
                        left: 0;
                        width: 100%;
                        height: 100%;
                    }

                    .slider_point_container {
                        position: absolute;
                        top: 0;
                        transform: translateX(-50%);
                        display: flex;
                        flex-direction: column;
                        align-items: center;
                    }

                    .slider_point {
                        width: 20rpx;
                        height: 20rpx;
                        border-radius: 50%;
                        margin-bottom: 10rpx;
                    }

                    .slider_point_label {
                        font-size: 24rpx;
                        color: #666;
                        width: 50rpx;
                        text-align: center;
                    }

                    .slider_handles {
                        position: absolute;
                        top: 0;
                        left: 0;
                        width: 100%;
                        height: 100%;
                        z-index: 2;
                    }

                    .slider_handle {
                        position: absolute;
                        top: 28rpx;
                        transform: translateX(-50%);
                        width: 30rpx;
                        height: 30rpx;
                        border-radius: 50%;
                        border: 6rpx solid #ffffff;
                        box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.2);
                    }
                }

                .show_more_box {
                    display: flex;
                    align-items: center;
                    padding: 10rpx 0;

                    .t {
                        font-weight: 400;
                        font-size: 24rpx;
                        color: #666666;
                        margin-right: 4rpx;
                    }
                }

                .control_box {
                    transition: all 0.3s ease-out;
                }

                .control_box.expanded {
                    max-height: 500rpx;

                    opacity: 1;
                    transform: translateY(0);
                }

                .control_box.collapsed {
                    max-height: 0;
                    opacity: 0;
                    transform: translateY(-20rpx);
                }
            }

            .su_btn_box {
                display: flex;
                justify-content: flex-end;
                position: relative;

                .su_btn {
                    width: 305rpx;
                    height: 80rpx;
                    line-height: 80rpx;
                    background: linear-gradient(154deg, #eddd1a 0%, #f9800f 100%);
                    box-shadow: 0rpx 10rpx 20rpx 0rpx rgba(185, 98, 33, 0.5);
                    border-radius: 42rpx;
                    font-family:
                        PingFangSC,
                        PingFang SC;
                    font-weight: 500;
                    font-size: 30rpx;
                    color: #ffffff;
                    text-align: center;
                }
            }
        }
    }
}

.van-tabs {
    width: 100% !important;

    &__line {
        display: none;
    }

    &__nav {
        padding: 0 20rpx;
        box-sizing: border-box;
    }

    &__scroll {
        background-color: transparent !important;
    }
}

.current {
    width: 112rpx;
    height: 56rpx;
    background: #fcfaee;
    box-shadow:
        1rpx 1rpx 2rpx 0rpx rgba(185, 98, 33, 0.5),
        inset 1rpx 1rpx 4rpx 0rpx rgba(249, 128, 15, 0.5);
    border-radius: 28rpx;
    font-family:
        PingFangSC,
        PingFang SC;
    font-weight: 500;
    font-size: 32rpx;
    color: #f9800f !important;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-class {
    width: 100vw;
    height: 60rpx;
    display: flex;
    align-items: center;
}

.category-item {
    width: 160rpx;
    height: 60rpx;
    font-family:
        Alibaba PuHuiTi 2,
        Alibaba PuHuiTi 20;
    font-weight: 400;
    font-size: 28rpx;
    text-align: center;
    font-style: normal;
    text-transform: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.list {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 20rpx;
    box-sizing: border-box;
    margin-top: 15rpx;

    .category_pctr {
        width: 345rpx;
        background: #fcfaee;
        box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(185, 98, 33, 0.2);
        border-radius: 20rpx;
        margin-bottom: 20rpx;
        box-sizing: border-box;

        .category_pic {
            width: 345rpx;
            height: 335rpx;

            margin: 0 auto;
            text-align: center;
            position: relative;

            image {
                width: 345rpx;
                height: 335rpx;
                border-radius: 18rpx;
                border-radius: 20rpx 20rpx 0 0;
            }
        }

        .info {
            padding: 0 16rpx;
            box-sizing: border-box;
            padding-bottom: 20rpx;

            .yuanjia {
                .icon {
                    font-weight: 500;
                    font-size: 24rpx;
                    color: #333333;
                }

                font-family: Alibaba PuHuiTi 2,
                Alibaba PuHuiTi 20;
                font-weight: 500;
                font-size: 24rpx;
                color: #333333;
                margin: 8rpx 0;
                display: flex;
                align-items: baseline;

                .num {
                    font-weight: 500;
                    font-size: 36rpx;
                    color: #333333;
                }

                .ordinary_price {
                    margin-left: 10rpx;
                    font-weight: 400;
                    color: #999999;

                    .icon {
                        font-size: 22rpx;
                    }

                    .num {
                        font-size: 24rpx;
                        text-decoration: line-through;
                    }
                }
            }

            .title {
                font-family:
                    Alibaba PuHuiTi 2,
                    Alibaba PuHuiTi 20;
                font-weight: 500;
                font-size: 24rpx;
                color: #333333;
                line-height: 36rpx;
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
                overflow: hidden;
                height: 72rpx;
                margin-top: 16rpx;
            }

            .vip_price_box {
                display: flex;
                align-items: center;
                justify-content: space-between;


                .n_price {
                    padding: 0 10rpx 0 20rpx;
                    height: 42rpx;
                    line-height: 42rpx;
                    background: #f9800f;
                    box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(185, 98, 33, 0.2);
                    border-radius: 30rpx 4rpx 4rpx 4rpx;
                    font-weight: 400;
                    font-size: 24rpx;
                    color: #fcfaee;
                    margin-top: 6rpx;
                    display: flex;

                    text {
                        margin-left: 20rpx;
                        position: relative;

                        &::after {
                            content: "";
                            display: block;
                            width: 2rpx;
                            height: 20rpx;
                            background-color: #fcfaee;
                            position: absolute;
                            top: 50%;
                            transform: translateY(-50%);
                            left: -10rpx;
                        }
                    }
                }

                .cart_icon {
                    width: 50rpx;
                    height: 50rpx;

                    image {
                        width: 50rpx;
                        height: 50rpx;
                        border-radius: 50%;
                    }
                }
            }
        }
    }
}

.van-tab {
    flex-basis: 21% !important;
}